home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 February / PCWorld_2000-02_cd.bin / Komunik / Webscr / HTMLtool / _SETUP.1 / Page Enter Horizontal Open.scp < prev    next >
Text File  |  1999-10-03  |  1KB  |  65 lines

  1. <HTMLtool>Page entering effect: Horizontal open</HTMLtool>
  2. <style>
  3. <!--
  4. .intro{
  5. position:absolute;
  6. left:0;
  7. top:0;
  8. layer-background-color:red;
  9. background-color:red;
  10. border:0.1px solid red
  11. }
  12. -->
  13. </style>
  14.  
  15. <div id="i1" class="intro"></div><div id="i2" class="intro"></div><script
  16. language="JavaScript1.2">
  17.  
  18.  
  19. var speed=20
  20. var temp=new Array()
  21. var temp2=new Array()
  22. if (document.layers){
  23. for (i=1;i<=2;i++){
  24. temp[i]=eval("document.i"+i+".clip")
  25. temp2[i]=eval("document.i"+i)
  26. temp[i].width=window.innerWidth/2
  27. temp[i].height=window.innerHeight
  28. temp2[i].left=(i-1)*temp[i].width
  29. }
  30. }
  31. else if (document.all){
  32. var clipright=document.body.clientWidth/2,clipleft=0
  33. for (i=1;i<=2;i++){
  34. temp[i]=eval("document.all.i"+i+".style")
  35. temp[i].width=document.body.clientWidth/2
  36. temp[i].height=document.body.offsetHeight
  37. temp[i].left=(i-1)*parseInt(temp[i].width)
  38. }
  39. }
  40.  
  41.  
  42. function openit(){
  43. window.scrollTo(0,0)
  44. if (document.layers){
  45. temp[1].right-=speed
  46. temp[2].left+=speed
  47. if (temp[2].left>window.innerWidth/2)
  48. clearInterval(stopit)
  49. }
  50. else if (document.all){
  51. clipright-=speed
  52. temp[1].clip="rect(0 "+clipright+" auto 0)"
  53. clipleft+=speed
  54. temp[2].clip="rect(0 auto auto "+clipleft+")"
  55. if (clipright<=0)
  56. clearInterval(stopit)
  57. }
  58. }
  59.  
  60. function gogo(){
  61. stopit=setInterval("openit()",100)
  62. }
  63. gogo()
  64.  
  65. </script>